<div id="song-credit-<%= credit.id %>">
  <div class="song-credit-item">
    <%=h credit.role %>
    <%=h (credit.details.blank?)? "" : " [" + credit.details + "]" %>
    by <strong><%= link_to credit.artist.name, credit.artist %></strong>
	<%= link_to_function ' Edit', "this.up().hide(), $('edit-song-credit-#{credit.id}').show()" %> |
	<%= link_to_remote 'x', :url => credit, :method => :delete %>
  </div>
              
  <div id="edit-song-credit-<%=h credit.id %>" style="display: none">
    <% form_remote_for :song_credit, :url => credit, :method => :put do |c| %>
	  <%=h credit.artist.name %> ||
	  Role: <%= c.select :role, SongCredit::ROLES, :selected => credit.role %> ||
	  Details: <%= c.text_field :details, :value => credit.details %>
	  <%= c.submit "Save Changes" %>
	  <%= submit_tag 'Cancel', :type => 'button', :onclick => "this.up(1).hide(),this.up(1).previous().show(),this.form.reset()" %>
	<% end %>

  </div>
</div>